<div class="dataTables_paginate paging_simple_numbers">
    <ul class="pagination">
        {% if objects.has_previous %}
        <li class="paginate_button previous">
            <a onclick="$('input[name=page]').val({{ objects.previous_page_number }});$('#query_form').submit();">上一页</a>
        </li>
        {% endif %}
        {% for i in objects.paginator.page_range %}
        <li {% ifequal i  objects.number %}class="paginate_button active" {% else %}class="paginate_button"{% endifequal %}>
            <a onclick="$('input[name=page]').val({{ i }});$('#query_form').submit();">{{ i }}</a>
        </li>
        {% endfor %}
        {% if objects.has_next %}
        <li class="paginate_button next">
            <a onclick="$('input[name=page]').val({{ objects.next_page_number }});$('#query_form').submit();" >下一页</a>
        </li>
        {% endif %}
    </ul>
</div>